<%@ page import="cn.ekgc.web166.entity.Student" %>
<%@ page import="cn.ekgc.web166.commons.DateUtils" %>
<%@ page import="cn.ekgc.web166.dao.StudentDaoImpl" %>
<%@ page import="cn.ekgc.web166.dao.StudentDao" %><%--
  Created by IntelliJ IDEA.
  User: seal
  Date: 2019/6/12
  Time: 17:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    request.setCharacterEncoding("utf-8");
    int id = Integer.parseInt(request.getParameter("id"));
    String name = request.getParameter("name");
    String gender = request.getParameter("gender");
    String bornday = request.getParameter("bornday");
    Student student = new Student(id,name,gender,DateUtils.getDate(bornday,"yyyy-MM-dd'T'HH:mm"));
    StudentDao dao = new StudentDaoImpl();
    dao.update(student);
    response.sendRedirect("listStudent.jsp");
%>
